package cn.gjxblog.proxy.base.cglib;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;

import java.lang.reflect.Method;

/**
 * TODO...
 *
 * @Author guojiaxun
 * @Date 2019/12/30 10:33
 */
public class MyMethodInterceptor implements MethodInterceptor {
	@Override
	public Object intercept(Object o, Method method, Object[] args, MethodProxy methodProxy) throws Throwable {
		System.out.println("cglib:method :" + method.getName() + " is invoked!");

		return methodProxy.invokeSuper(o, args);
	}
}
